<?php
/**
 * Created by JetBrains PhpStorm.
 * User: vander
 * Date: 5/5/13
 * Time: 3:20 PM
 * To change this template use File | Settings | File Templates.
 */
$imageDir = 'MyUploader/server/php/files/';

$images = glob($imageDir."*."."{gif,png,jpeg,jpg,bmp,GIF,PNG,JPEG,JPG,BMP}", GLOB_BRACE);
echo json_encode($images);

?>